package com.jm.bishe.service.Impl;

import com.jm.bishe.mapper.PermissionMapper;
import com.jm.bishe.service.PermissinService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class PermissionServiceImpl implements PermissinService {

    @Autowired
    PermissionMapper mapper;

    @Override
    public boolean queryPermission(String userId, int permissionLevel) {
        int i = mapper.queryPermission(userId);
        return i < permissionLevel;
    }
}
